# 使用java环境
FROM java
# 缓存目录
VOLUME manage
# 将当前项目的jar包添加到容器中
ADD "target/manage-0.0.1-SNAPSHOT.jar" "manage.jar"
# 解决时区差八小时的问题
ENV JAVA_OPTS="$JAVA_OPTS -Duser.timezone=GMT+08"
ENV TZ=PRC
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \&& echo 'Asia/Shanghai' >/etc/timezone \
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 当容器启动时 执行启动命令
ENTRYPOINT ["java","-jar","manage.jar","--spring.profiles.active=dev"]
